// export const URL_SOCKET = import.meta.env.VITE_URL_SOCKET "ws://192.168.150.167:8087/websocket";
// export const URL_SOCKET_CHAIN = "ws://192.168.150.166:8088/websocket";
export const URL_SOCKET = getUrl(import.meta.env.VITE_URL_SOCKET, 1);
export const URL_SOCKET_CHAIN = getUrl(import.meta.env.VITE_URL_SOCKET_CHAIN, 2) ;

function getUrl(url:string, num:number){
    if(location.protocol == "http:"){
        if(num == 1){
            return "ws://192.168.150.188:8080/websocket"
        }
        return "ws://192.168.150.188:8080/chain-websocket"
    }
    return url;
    
}

export const URL_LOGIN = "/api/user/login";
export const URL_WALLET_CONTENT = '/api/user/third_party/wallet/connect';//钱包连接
export const URL_WALLET_NONCE = '/api/user/third_party/wallet/nonce';//获取钱包的nonce
export const URL_WALLET_VALIDATE = '/api/user/third_party/wallet/validate' //钱包校验
export const URL_WALLET_BIND = '/api/user/third_party/wallet/bind' //钱包绑定

export const URL_REGISTER = "/api/user/register";
export const URL_USER_EXIST = "/api/user/account/exist";
export const URL_AI_VERIFY = "/api/user/captchaVerify";

export const URL_REGISTER_CHECK = "/api/user/checkRegistered";
export const URL_EMAIL_CODE = "/api/user/email_code";
export const URL_LOGIN_OUT = "/api/user/logout";
export const URL_GOOGLE_CALLBACK = "/api/user/third_party/callback/google";

export const URL_BIND_EMAIL = "/api/user/bindEmail"; //绑定邮箱
// export const URL_FOLLOW_TWITTER = "/api/user/userMission/@/follow/energy"; //领取推特奖励

export const URL_IS_LOGIN = "/api/user/isLogin"; //判断用户是否登录
export const URL_USER_INFO = "/api/user/myDetails/getMyDetails"; //获取个人资料
export const URL_GET_MISSION = "/api/user/myDetails/getUserMission"; //获取用户任务详情

export const URL_GET_MAX_ENERGY = "/api/user/mission/reg/max/energy";//注册获取最高能量
export const URL_GET_REGISTER_ENERGY = "/api/user/myDetails/get/register/energy";//领取注册奖励


export const URL_DAILY_MISSION = "/api/user/myDetails/getDailyMission"; //日常任务

export const URL_MISSION_STATUS = "/api/user/userMission/count";//未完成任务数量

export const URL_COMPLETE_MISSION = "/api/user/myDetails/completeMission"; //领取奖励
export const URL_SIGN_LIST = "/api/user/myDetails/signList"; //签到列表
export const URL_ADD_SUBSCRIBER = "/api/user/myDetails/addSubscriber"; //订阅频道
export const URL_ENERGY_FLOW = "/api/user/myDetails/getEnergyFlow"; //获取能量明细

export const URL_CHANNEL_LIST = "/api/user/myDetails/getChannelList"; //频道列表及订阅信息

export const URL_CHANNEL_SUBSCRIBER = "/api/user/myDetails/getSubscriberList"; //已订阅列表

export const URL_ADD_VIP = "/api/user/myDetails/addUserVip"; //订阅VIP
export const URL_INVITE = "/api/user/myDetails/inviteList"; //邀請

export const URL_VIP_LIST = "/api/user/myDetails/getVipList"; //vip信息

export const URL_INVITE_RANK = "/api/user/myDetails/getInviteTopUser"; //邀请榜单

export const URL_SIGN = "/api/user/myDetails/sign"; //签到
export const URL_LOGIN_TWITTER = "/api/user/third_party/twitter"; //twitter登录
export const URL_TWITTER_CALLBACK = "/api/user/third_party/callback/twitter"; //twitter回调

export const URL_KLINE_SYMBOL = "/api/stream/pair/list";
export const URL_KLINE_HISTORY = "/api/chain-stream/activity/list";
export const URL_KLINE_DATA = "/api/stream/bar/@/list"; //幣種詳情K线

export const URL_SIGNAL_LIST = "/api/stream/signal/list"; //信号列表
export const URL_RECOMMEND_LIST = "/api/stream/signal/recommendations"; //推荐信号列表


export const URL_POSITION_RATIO = "/api/statistics/future/topLongShortPositionRatio"; //大户持仓量多空比
export const URL_ACCOUNT_RATIO = "/api/statistics/future/topLongShortAccountRatio"; //大户账户数多空比
export const URL_AUTO_RATIO = "/api/statistics/future/takerLongShortRatio"; //合约主动买卖量
export const URL_CONTRACT_HIST = "/api/statistics/future/openInterestHist"; //合约持仓量
export const URL_TOTAL_RATIO = "/api/statistics/future/globalLongShortAccountRatio"; //多空持仓人数比
export const URL_FUNDING_RATE = "/api/statistics/future/fundingRate"; //查询资金费率历史

export const URL_CLEVER = "/api/statistics/capital/random"; //聪明钱
export const URL_RANDOM_CLEVER = "/api/statistics/capital/random"; //换一批聪明钱

export const URL_TOKEN_DATA = "/api/statistics/token/data"; //鏈上K线
export const URL_CLEVER_CAPITAL = "/api/statistics/capital/@"; //聪明钱机构详情

export const URL_CAPITAL_LIST = "/api/statistics/capital/list"; //机构列表
export const URL_CAPITAL_SMART = "/api/statistics/capital/capital-info"; //机构聪明钱
export const URL_CAPITAL_DETAIL = "/api/statistics/capital/info/list"; //机构详细列表
export const URL_CAPITAL_INOUT = "/api/statistics/capital/top-diff-trade"; //机构in out交易统计排名

export const URL_TOKEN_POSITION = "/api/statistics/token/@/capital/position";//鏈上持仓

export const URL_CLEVER_CAPITAL_COINS = "/api/statistics/capital/@/symbols"; //聪明钱机构币种列表
export const URL_CLEVER_CAPITAL_POSITION = "/api/statistics/capital/@/position"; //聪明钱机构仓位数据
export const URL_CAPITAL_HISTORY = "/api/statistics/capital/@/history-amount"; //机构历史余额
export const URL_CAPITAL_TRANSACTIONS = "/api/statistics/capital/transactions"; //机构链上交易
export const URL_CAPITAL_BIGAMOUNT = "/api/statistics/capital/@/big-amount"; //机构大额异动
export const URL_CAPITAL_TOP = '/api/statistics/capital/top-cex-trade'; //交易所token交易统计排名
export const URL_PERSON_DETAIL = "/api/statistics/token/list"; //个人详情
export const URL_PERSON_COINS = "/api/statistics/personal/@/symbols"; //个人币种列表
export const URL_PERSON_POSITION = "/api/statistics/personal/@/position"; //个人仓位数据
export const URL_PERSON_HISTORY = "/api/statistics/personal/@/history"; //个人历史余额

// export const URL_PERSON_TRANSACTIONS = "/api/statistics/personal/transactions";//个人链上交易
export const URL_PERSON_TRANSACTIONS = "/api/statistics/block-transactions/address"; //个人链上交易-优化
export const URL_PERSON_BIGAMOUNT = "/api/statistics/personal/@/big-amount";

export const URL_BUY_EQUITY = "/api/statistics/token/@/buy-equity"; //买入净值
export const URL_CAPITAL_EQUITY = "/api/statistics/token/@/capital-equity"; //CEX净流出

export const URL_BUY_EQUITY_HOME = "/api/statistics/token/@/block-equity"; //买入净值
export const URL_CAPITAL_EQUITY_HOME = "/api/statistics/token/@/cex-equity"; //CEX净流出

// export const URL_CAPITAL_EQUITY = "/api/statistics/token/@/cex-equity capital-equity";

export const URL_AVATAR = "http://192.168.150.165:8080/avatar/@"; //頭像
// export const URL_KLINE_SYMBOL = "/api/stream/pair/list";
export const URL_SEARCH = "/api/statistics/token/search"; //搜索
export const URL_LAST_ACTIVE = "/api/statistics/personal/@"; //最后活动时间
export const URL_TOKEN_DETAIL = "/api/statistics/token/@"; //幣詳情
export const URL_TOLEM_BIGAMOUNT = "/api/statistics/token/@/big-amount"; //币大额异动

export const URL_TOKEN_TRANSACTIONS = "/api/statistics/block-transactions/token"; //token交易數據
export const URL_TRANSACTIONS = "/api/statistics/block-transactions"; //交易數據

// export const URL_ABNORMAL_TOP_UP = "/api/statistics/abnormal/top-up";//最大涨幅
export const URL_ABNORMAL_TOP_UP = "/api/statistics/abnormal/v2/top-up"; //最大涨幅
// export const URL_ABNORMAL_TOP_DOWN = "/api/statistics/abnormal/top-down";//最大跌幅
export const URL_ABNORMAL_TOP_DOWN = "/api/statistics/abnormal/v2/top-down"; //最大跌幅
// export const URL_ABNORMAL_TOP_TURNOVER = "/api/statistics/abnormal/top-turnover";//成交榜
export const URL_ABNORMAL_TOP_TURNOVER = "/api/statistics/abnormal/v2/top-turnover"; //成交榜
export const URL_ABNORMAL_TOP_HOT = "/api/statistics/abnormal/v2/top-hot";

export const URL_TRANSACTIONS_CEX = "/api/statistics/capital/transactions/cex"; //cex链上交易
export const URL_COIN_PAIR_DETAIL = "/api/statistics/pair/@"; //币种详情
export const URL_TOKEN_RECOMMEND = "/api/statistics/token/recommend"; //币种详情

export const URL_SIGNAL_RECOMMEND = "/api/stream/signal/recommendations"; //信号推荐币

export const URL_SCROLL_NEWS = "/api/stream/information/footer-scrolls"; //滚动信息
export const URL_PRESS_NEWS = "/api/stream/information/news"; //新闻信息
export const URL_NEWS_LAST = "/api/stream/information/newsLastTime";//最后一条新闻的时间
export const URL_PRESS_NEWS_PAGE = "/api/stream/information/news/page"; //新闻信息分页
export const URL_CAPITAL_AMOUNT = "/api/statistics/capital/@/total-amount"; //机构最近七天总余额
export const URL_PERSON_AMOUNT = "/api/statistics/personal/@/seven-days"; //个人最近七天总额
export const URL_TRADE_TOP = '/api/statistics/capital/top-trade'

export const URL_WAVE_AMOUNT = "/api/stream/pair/fluctuation/analysis"; //链上分析推送流服务

export const URL_SIGNAL_BIG_AMOUNT = "/api/stream/signal/big-amount"; //大额交易
export const URL_SIGNAL_BIG_AMOUNT_MORE = "/api/stream/signal/more-big-amount"; //更多大额交易
export const URL_INVITEPAGE = '/api/user/myDetails/invitePage';//邀请分页查询
export const URL_USERENERGYCOUNT = '/api/user/myDetails/userEnergyCount';// 用户能量统计
export const URL_GETTOPUSER = '/api/user/myDetails/getTopUser';// 邀请榜单
export const URL_LOGS = '/api/user/login/logs';// 用户登录日志
export const URL_COUNTDOWN = '/api/user/config/countdown';// 用户登录日志

export const URL_COIN_STATE = '/api/stream/pair/ticker24';//当前币最高最低信息

export const URL_CHECK_TELEGRAM = '/api/user/third_party/telegram/chat/member/@';//判断电报聊天成员
export const URL_FOLLOW_REWARD = '/api/user/userMission/@/follow/energy';//电报成员和关注twitter奖励 1=推特；2=电报
export const URL_HASH_QUERY = '/api/statistics/block-transactions/tx/@';//哈希交易查询
export const URL_FOLLOW_TWITTER = '/api/user/third_party/twitter/follow/@';//电报成员和关注twitter奖励 1=推特；2=电报

export const URL_FEEDBACK = '/api/statistics/feedback';//提交反馈
export const URL_TG_TOKEN = '/api/user/third_party/telegram/chat/token';//TG聊天成员令牌
export const URL_METAMASK = '/api/user/third_party/meta/mask';//MetaMask 登陆接口

export const URL_PING = '/api/user/ping';


export const URL_ETF_LIST = "/api/statistics/etf/list";
export const URL_ETF_TRANSACTION = "/api/statistics/etf/@/transactions";
export const URL_ETF_DETAIL = "/api/statistics/etf/@/detail";
export const URL_GET_DOWN = '/api/user/config/checkin_countdown';//领取倒计时

export const URL_WEB_LOG = "/api/user/active"


//Bearish - 空   Bullish - 多
export const URL_VERIFY = "";


